from flask_restx import Model, fields


CommonSchema = Model('CommonSchema', {
    "error_code": fields.Integer(description="错误码"),
    "message": fields.String(description="错误信息"),
    "result": fields.Raw(description="结果")
}
)

PageBaseSchema = Model('PageBaseSchema', {
    "page": fields.Integer(description="The page number"),
    "size": fields.Integer(description="The page size"),
    "has_next": fields.Boolean(description="The has next"),
    "has_prev": fields.Boolean(description="The has previous"),
    "total": fields.Integer(description="The total number"),
    "items": fields.Raw(description="The data list"),
}
)
